package com.fast.alden.data.model;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 消息
 */
@Getter
@Setter
@Entity
public class SysMessage extends BaseTreeNodeEntity {
    /**
     * 消息类型
     */
    @Enumerated(EnumType.STRING)
    private SysMessageType type;
    /**
     * 接收人ID
     */
    private Long receiverId;
    /**
     * 接收人昵称
     */
    private String receiverName;
    /**
     * 发送人ID
     */
    private Long senderId;
    /**
     * 发送人昵称
     */
    private String senderName;
    /**
     * 发送时间
     */
    private LocalDateTime sentTime;
    /**
     * 是否已读
     */
    private Boolean readState;
    /**
     * 已读时间
     */
    private LocalDateTime readTime;
    /**
     * 标题
     */
    private String title;
    /**
     * 内容
     */
    @Lob
    @Column(columnDefinition = "text")
    private String content;
}
